<template>
	<view>
		<view class="header-title">注意!!!清空数据后将无法恢复，确定清空吗？</view>
		<view class="header-main">请在文本框中输入<text>“我确认”</text></view>
		<input class="inputcss" @input="getContent" />
		<view class="buttoncss">取消</view>
		<view class="buttoncss other" @tap="del">清空</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			getContent(e) {
				console.log(e.detail.value)
			},
			del() {
				uni.showModal({
					title: "系统提示",
					content: '清空后数据将无法修复,确认清空吗?',
					confirmColor: '#00A0E9',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	page {
		font-family: PingFang SC;
		font-weight: 500;
	}

	.header-title {
		width: 690rpx;
		margin: 200rpx auto 0;
		height: 60rpx;
		font-size: 30rpx;
		color: #ff0000;
		text-align: center;
		line-height: 60rpx;
	}

	.header-main {
		width: 690rpx;
		margin: 20rpx auto 0;
		height: 60rpx;
		font-size: 30rpx;
		color: #333;
		text-align: center;
		line-height: 60rpx;

		text {
			font-weight: bold;
		}
	}

	.inputcss {
		width: 600rpx;
		height: 80rpx;
		margin: 20rpx auto 0;
		line-height: 80rpx;
		border: 1rpx solid #DFDFDF;
		border-radius: 10rpx;
	}

	.buttoncss {
		width: 690rpx;
		position: fixed;
		bottom: 20%;
		left: 30rpx;
		height: 90rpx;
		line-height: 90rpx;
		border: 1rpx solid #DFDFDF;
		border-radius: 45rpx;
		font-size: 36rpx;

		color: #333;
		text-align: center;
	}

	.other {
		bottom: 10%;
		color: #fff;
		background: #00A0E9;
	}
</style>
